package com.ruoyi.project.system.orderteamuser.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.system.orderteamuser.domain.OrderTeamUser;
import com.ruoyi.project.system.orderteamuser.mapper.OrderTeamUserMapper;
import com.ruoyi.project.system.orderteamuser.service.IOrderTeamUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 拼团订单人员Service业务层处理
 * 
 * @author f_baisi
 * @date 2021-03-04
 */
@Service
public class OrderTeamUserServiceImpl implements IOrderTeamUserService 
{
    @Autowired
    private OrderTeamUserMapper orderTeamUserMapper;

    /**
     * 查询拼团订单人员
     * 
     * @param id 拼团订单人员ID
     * @return 拼团订单人员
     */
    @Override
    public OrderTeamUser selectOrderTeamUserById(String id)
    {
        return orderTeamUserMapper.selectOrderTeamUserById(id);
    }

    /**
     * 查询拼团订单人员列表
     * 
     * @param orderTeamUser 拼团订单人员
     * @return 拼团订单人员
     */
    @Override
    public List<OrderTeamUser> selectOrderTeamUserList(OrderTeamUser orderTeamUser)
    {
        return orderTeamUserMapper.selectOrderTeamUserList(orderTeamUser);
    }

    /**
     * 新增拼团订单人员
     * 
     * @param orderTeamUser 拼团订单人员
     * @return 结果
     */
    @Override
    public int insertOrderTeamUser(OrderTeamUser orderTeamUser)
    {
        return orderTeamUserMapper.insertOrderTeamUser(orderTeamUser);
    }

    /**
     * 修改拼团订单人员
     * 
     * @param orderTeamUser 拼团订单人员
     * @return 结果
     */
    @Override
    public int updateOrderTeamUser(OrderTeamUser orderTeamUser)
    {
        return orderTeamUserMapper.updateOrderTeamUser(orderTeamUser);
    }

    /**
     * 删除拼团订单人员对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteOrderTeamUserByIds(String ids)
    {
        return orderTeamUserMapper.deleteOrderTeamUserByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除拼团订单人员信息
     * 
     * @param id 拼团订单人员ID
     * @return 结果
     */
    @Override
    public int deleteOrderTeamUserById(String id)
    {
        return orderTeamUserMapper.deleteOrderTeamUserById(id);
    }

    @Override
    public OrderTeamUser findByOrderId(String orderId) {
        return orderTeamUserMapper.findByOrderId(orderId);
    }

    @Override
    public List<OrderTeamUser> findListByTeamId(String teamId) {
        return orderTeamUserMapper.findListByTeamId(teamId);
    }
}
